def letters():
    global s
    for i in s:
        if (i.isalpha()):
            s = s.replace(i, '')


def reverse(s):
    if s == "":
        return s
    else:
        return reverse(s[1:]) + s[0]


s = input("请输入一行字符串：")
letters()
print(reverse(s))
